export function attachmentFormatter(val) {
	if (val instanceof Array && val.length) {

		let attachment = val.map((item) => {
			return {
				name: item.file?.oldName || item.name || item.fileName,
				url: item.file?.url || item.url
			}
		})
		return JSON.stringify(attachment)
	}
	return val
}
